package com.yanqu.road.server.cmd.activity.rankunionwar;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.RankUnionWarProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.rankunionwar.CrossRankUnionWarMgr;
import com.yanqu.road.server.manager.activity.rankunionwar.activity.CrossRankUnionWarActivity;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C2_CROSS_RANKUNIONWAR_CRICKET_TIMES, desc = "")
public class CrossRankUnionWarCricketTimesCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        RankUnionWarProto.CrossCricketActivityWarTimesReqMsg reqMsg = RankUnionWarProto.CrossCricketActivityWarTimesReqMsg.parseFrom(packet.getBytes());
        CrossRankUnionWarActivity activity = CrossRankUnionWarMgr.getActivity(reqMsg.getActivityId());
        if(activity != null){
            activity.activityCricketTimes(serverId,packet.getPlayerId(),reqMsg);
        }
    }

    @Override
    public void sendData() {

    }
}
